import requests
import time
import random
import string
import myutl
word=myutl.getkeyword()
timestamp=str(int(round(time.time()*1000)))
requests_id=''.join([random.choice(string.digits+string.ascii_letters)for i in range(20)])
print(requests_id)
ProfileModify_head={
"X-request-id" : requests_id,
"X-product" :	"product=app;version=1.5.0",
"X-device-info" :	"platform=Android;osver=10;romver=EmotionUI_12.0.0;model=VCE-AL00;lang=zh;channel=fhzq",
"X-device-id" : "4d9dc0a97157d18e",
"X-timestamp":timestamp,
"X-net": "wifi",
"X-lang":"zhCn",
"X-uin":"1061908",
"X-session":'session=ee0e8f22f898490f826730e6fd5375f2;session3=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJoIjoxLCJoZCI6IiIsInUiOjQsInVkIjoiIiwiaXNTaWduIjoxLCJleHAiOjE2NjI4ODEwMjIsImlhdCI6MTY2MjI3NjIyMn0.59o-MXOJHfUd8xN-AL7IDo9U2JX9QAkRxf7KT2GBDbs',

"X-sign":	"554e364fdbe99bef283e014564a34e304bd60ea7921d6b86c562440c86eb6ea9",
"Content-Type":	"text/enc;ver=1; charset=utf-8",
"Host":	"uc-sit.xingyunplan.com",
"Cookie":	"uin=1061908",
"User-Agent":	"okhttp/4.9.3",
}



ProfileModify_url="http://uc-sit.xingyunplan.com/uc/v1/ProfileModify"
for i in word:
    ProfileModify_body = {
        "method": "/uc/v1/ProfileModify",
        "id": requests_id,
        "params": {
            "nickName": i,
            "avatar": "001fab09f3694b3aa349748928da1bea365",
            "gender": 0},
        "jsonrpc": "2.0"
    }
    jsp=requests.post(url=ProfileModify_url,json=ProfileModify_body,headers=ProfileModify_head).json()
    if jsp["re"][".."] =="":
        pass



'''
{"method":"/uc/v1/ProfileModify","id":"b76c505b-c6ee-524a-8b41-92fddd1d1922","params":{"nickName":"2213","avatar":"001fab09f3694b3aa349748928da1bea365","gender":0},"jsonrpc":"2.0"}

{"jsonrpc":"2.0","id":"b76c505b-c6ee-524a-8b41-92fddd1d1922","result":null}


{"jsonrpc":"2.0","id":"47baeebd-7be6-5785-83b4-77a46828ab77","result":null}
错误
{"jsonrpc":"2.0","error":{"code":110024,"message":"","data":null},"id":"33675d1d-6653-505f-b1b3-f8cf0a32e42f"}

{"method":"/uc/v1/UserUpdate","id":"0a9d2f79-f2cb-5b5f-a8c7-9125ce46e3bc","params":{"language":"zhCn"},"jsonrpc":"2.0"}
{"jsonrpc":"2.0","result":{},"id":"0a9d2f79-f2cb-5b5f-a8c7-9125ce46e3bc"}
'''

